#include <iostream>
#include <unistd.h>

using namespace std;

int main()
{
  int n=4;
  while(n)
  {
    cout << "程序替换成功";
    cout << " PID:" << getpid() << "   PPID:" << getppid() << endl;
    sleep(1);
    n--;
  }

  return 0;
}

